﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title></title>
    <script type="text/javascript" language="javascript" src="JS/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" language="javascript" src="JS/json.js"></script>
    <script type="text/javascript" language="javascript">
        function PicClick(obj) {
            window.external.ShowPic(obj.alt);
        }

        function ShowPicList(nameList, path) {
            var list = JSON.parse(nameList);
            var strhtml = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
            for (i = 0; i < list.length; i++) {
                var fileName = list[i];
                var picPath = path + fileName;
                var index = fileName.indexOf("_");
                strhtml = strhtml + "<tr><td align=\"center\">";
                if (index > -1) {
                    strhtml = strhtml + "<img alt=\"" + fileName + "\"  src=\"" + picPath + "\" style=\"margin:2px 2px 2px 2px;\" onclick=\"PicClick(this)\" /><br/>" + (i + 1) + "(已分)<br/>";
                } else {
                    strhtml = strhtml + "<img alt=\"" + fileName + "\" src=\"" + picPath + "\" style=\"margin:2px 2px 2px 2px;\" onclick=\"PicClick(this)\" /><br/>" + (i + 1) + "<br/>";
                }
                strhtml = strhtml + "</td></tr>";
            }
            strhtml = strhtml + "</table>";
            $("#divPicShow").html(strhtml);
            $("tr").live("click", function () {
                $(this).addClass("selected").siblings().removeClass("selected");
            });
            //location = "PicList.htm";
        }
        
    </script>
    <style type="text/css">
        .selected
        {
                background-color:red;
            }
    </style>
</head>
<body>
    <div id="divPicShow" style="text-align: center; font-size: 10px;">
    </div>
</body>
</html>
